<?php
$this->breadcrumbs=array(
	'Export Informations',
);

$this->menu=array(
	array('label'=>'Create export_information', 'url'=>array('create')),
	array('label'=>'Manage export_information', 'url'=>array('admin')),
);
?>

<h1>Export Informations</h1>

<?php $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); ?>

<?php
$cs = Yii::app()->ClientScript;
$script =<<<EOD
$.collection_create_form = {
	afterSubmit:function(data){
		window.location = "$cargoViewURL";
	}
};
$('#collection-form [type=submit]').click(function(){
	var form = $.extend($.simplelogform,$.collection_create_form);
	form.Submit($('#collection-form'));
	return false;
});
$('#addAddress, #addDelAddress').click(function(){
	var selected = $(this).parent('.row').children('select');
	$(selected).getInfo({url:'$getAddressUrl',success:function(data){
		$(selected).parent('.row').children('textarea').val(data);
	}});
	return false;
});
$('#addContact, #addDelContact').click(function(){
	var selected = $(this).parent('.row').children('select');
	$(selected).getInfo({url:'$getContactUrl',success:function(data){
		var contact = $(selected).parent('.row').children('input').val()+data+',';
		$(selected).parent('.row').children('input').val(contact);
	}});
	return false;
});
EOD;
$cs->registerScript('collection#create#form',$script);
?>